<div class="wechat_box">
    <div class="miniapp">
        <div class="miniapp_title">{$member_miniapp.appname}</div>
        <div class="miniapp_body"></div>
    </div>
    <div class="wechat_lists">
        <div id="actionbar">
            <button url="{:url('adwords/edit',['group' => $group])}" class="button button-blue action"> <i class="iconfont icon-add_icon"></i>新增内容</button>
        </div>
        <table class="table">
            <thead>
                <tr>
                    <th class="w60 fn-tac">排序</th>
                    <th class="w90 fn-tac">内容</th>
                    <th>链接地址</th>
                    <th class="w200">打开方式</th>
                    <th class="w140">更新时间</th>
                    <th class="w160 fn-tac">操作</th>
                </tr>
            </thead>
            <tbody>
                {foreach $lists as $vo}
                <tr>
                    <td class="fn-tac"><input name="sort" class="fn-tac w40 input input-mini" type="text" value="{$vo['sort']}" id="{$vo.id}" /></td>
                    <td class="fn-tac">
                        <a href="javascript:;" url="{:url('adwords/edit',['id'=>$vo.id])}" class="action"><img src="{$vo.picture}" style="max-width:60px;" /></a>
                    </td>
                    <td>{$vo.title}<p class="gray">{$vo.link|dehtml}</p></td>
                    <td>
                        {if $vo.open_type =='navigate'}保留并跳转到新页面{elseif $vo.open_type =='redirect'}关闭并跳转到新页面{else}关闭并跳转Tab页面{/if}
                    </td>
                    <td>{$vo.update_time|date='Y-m-d H:i'}</td>
                    <td class="button-group fn-tac">
                        <a class="button action" href="javascript:;" url="{:url('adwords/edit',array('id'=>$vo.id))}" title="编辑"><i class="iconfont icon-edit"></i>编辑</a>
                        <a class="button isDel" url="{:url('adwords/delete',array('id'=>$vo.id))}" href="javascript:;" title="删除"><i class="iconfont icon-lajixiang"></i>删除</a>
                    </td>
                </tr>
                {/foreach}
            </tbody>
        </table>
    </div>
</div>
<style type="text/css">
 .swiper-container {width: 100%;height:160px;}  
 .swiper-container img{height: 100%;width: 100%;}
 .icons{text-align: center;line-height: 30px;font-size: 12px;}
</style>
<script id="{$group}" type="text/html">
    {switch $group}
        {case index}
            <div class="swiper-container">
                <div class="swiper-wrapper">
                    {foreach $lists as $vo}<div class="swiper-slide"><img src="{$vo.picture}" class="w100-100 action fn-cp" url="{:url('adwords/edit',array('id'=>$vo.id))}"/></div>{/foreach}
                </div>
                <div class="swiper-pagination"></div>
            </div>
        {/case}
    {case icon}
        <div class="row mt5">
            {foreach $lists as $vo}
            <div class="col-20">
                <div class="icons fn-cp action" url="{:url('adwords/edit',['id'=>$vo.id])}">
                    <img src="{$vo.picture}" class="w100-70"/><p>{$vo.title}</p>
                </div>
            </div>
            {/foreach}
        </div> 
    {/case}
    {case ineven}
    <div class="row m5">
        {foreach $lists as $vo}
        <div class="col-50">
            <div class="icons fn-cp action" url="{:url('adwords/edit',['id'=>$vo.id])}"><img src="{$vo.picture}" class="w100-100"/></div>
        </div>
        {/foreach}
    </div> 
    {/case}
    {default /}
        {foreach $lists as $vo}<img src="{$vo.picture}" class="w100-100 action fn-cp " url="{:url('adwords/edit',['id'=>$vo.id])}"/> {/foreach}
    {/switch}
</script>
<script type="text/javascript">
    Do('base', 'layer','swiper','tpl',function () {
        $(".miniapp_body").html(template('{$group}'));
        var mySwiper = new Swiper ('.swiper-container',{loop: true,autoplay:true,pagination: {el: '.swiper-pagination'}})
        $('.action').win({reload:1,area: ['650px', '450px']});
        $('.isDel').isDel();
        sort("{:url('adwords/sort')}");
    })
</script>